//import angular core
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

//import my modules
import { ManageRoomModule } from './manage-room/manage-room.module';
import { ManageHotelModule } from './manage-hotel/manage-hotel.module';
import { OrderFoodModule } from './order-food/order-food.module';
import { ProfileModule } from './profile/profile.module';

//import my components
import { IndexComponent } from './index/index.component';
import { NavbarComponent } from './navbar/navbar.component';
import { ManageHotelComponent } from './manage-hotel/manage-hotel.component';
import { ProfileComponent } from './profile/profile.component';
import { SignInComponent } from './sign-in/sign-in.component';
import { SignUpComponent } from './sign-up/sign-up.component';

const routes: Routes = [
    {
        path: '',
        redirectTo: 'index',
        pathMatch: 'full'
    },
    {
        path: 'index',
        component: IndexComponent
    },
    {
        path: 'navbar',
        component: NavbarComponent
    },
    {
        path: 'order-food',
        loadChildren: 'app/order-food/order-food.module#OrderFoodModule'
    },
    {
        path: 'manage-hotel',
        loadChildren: 'app/manage-hotel/manage-hotel.module#ManageHotelModule'
    },
    {
        path: 'manage-room',
        loadChildren: 'app/manage-room/manage-room.module#ManageRoomModule'
    },
    {
        path: 'profile',
        loadChildren: 'app/profile/profile.module#ProfileModule'
    },
    {
        path: 'sign-in',
        component: SignInComponent
    },
    {
        path: 'sign-up',
        component: SignUpComponent
    },
];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})

export class AppRoutingModule { }
